package com.txl.cn.lc

/**
  * Created by txl on 2018/6/27.
  */
case class Pro(val province:String,val sums:Int,val rank:Int) extends Ordered[Pro]{
  override def compare(that: Pro): Int = {
    if(this.sums==that.sums){
     this.rank-that.rank
    }else{
      that.sums-this.sums
    }
  }

  override def toString: String = s"$province,$sums,$rank"
}
